import pandas as pd
from pyecharts.charts import Map

df = pd.read_csv(open('C:\\Users\\27498\\Desktop\\hanhongwei.csv', encoding='utf-8'))
nwe_df2 = df[df['Province'].notnull()]
data = nwe_df2.groupby('Province')['Province'].count()
from pyecharts.charts.basic_charts.map import Map

# 绘图
label = list(data.index)
value = list(data)
print(label)
print(value)
map: Map = Map()
map.add("", label,value).width("1000")
map.render('hanhongwei.html')
